﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace BLL
{
    public class URLInfo
    {
        private static readonly IDAL.IURLInfo dalurl = DALFactory.DataAccess.CreateURLInfo();
        /// <summary>
        /// 查询某网址夹下的网址信息
        /// </summary>
        /// <param name="fid">网址夹编号</param>
        /// <returns>网址信息集合</returns>
        public static IList<Model.URLInfo> GetURLInfo(int fid)
        {
           
            return dalurl.GetURLInfoByFID(fid);
        }
        /// <summary>
        /// 添加网址信息
        /// </summary>
        /// <param name="modurl">网址信息实体</param>
        /// <returns>是否成功</returns>
        public static bool AddURLInfo(Model.URLInfo modurl)
        {
            return dalurl.AddURLInfo(modurl) == 1 ? true : false;
        }
        /// <summary>
        /// 通过网址夹查询网址信息
        /// </summary>
        /// <param name="fid">网址夹编号</param>
        /// <returns>数据集</returns>
        public static DataSet GetURLInfoDataSet(int fid)
        {
            
            return dalurl.GetURLInfoDataSet(fid);
        }
        /// <summary>
        /// 通过主键查询网址信息
        /// </summary>
        /// <param name="urid"></param>
        /// <returns></returns>
        public static Model.URLInfo GetURLInfoPK(int urid)
        {
            return dalurl.GetURLInfoPK(urid);
        }
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="urid"></param>
        /// <returns></returns>
        public static bool DeleteURLInfo(int urid)
        {
            return dalurl.DeleteURLInfo(urid) == 1 ? true : false;
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="modurl"></param>
        /// <returns></returns>
        public static bool UpdateURLInfo(Model.URLInfo modurl)
        {
            return dalurl.UpdateURLInfo(modurl)==1?true:false;
        }
    }
}
